home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Information / Digests / CSMP Digest / volume 1 / csmp-v1-226.txt < prev    next >
Encoding:
Text File  |  1994-12-08  |  33.4 KB  |  928 lines  |  [TEXT/R*ch]

  1. C.S.M.P. Digest             Tue, 22 Dec 92       Volume 1 : Issue 226
  2.  
  3. Today's Topics:
  4.  
  5.     DPI on the fly
  6.     Floating Point to String Conversion
  7.     Invalidating the Entire Screen?
  8.     3D graphics...
  9.     How do you make a master disk?
  10.     Possible Bug  With MPW
  11.     Reading in jpeg compressed PICT files
  12.  
  13.  
  14.  
  15. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  16.  
  17. The digest is a collection of article threads from the internet newsgroup
  18. comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
  19. regularly and want an archive of the discussions.  If you don't know what a
  20. newsgroup is, you probably don't have access to it.  Ask your systems
  21. administrator(s) for details.  You can post articles to any newsgroup by
  22. mailing your article to newsgroup@ucbvax.berkeley.edu.  So, to post an
  23. article to comp.sys.mac.programmer, you mail it to
  24. comp-sys-mac-programmer@ucbvax.berkeley.edu.  Note the '-' instead of '.'
  25. in the newsgroup name.
  26.  
  27. Each issue of the digest contains one or more sets of articles (called
  28. threads), with each set corresponding to a 'discussion' of a particular
  29. subject.  The articles are not edited; all articles included in this digest
  30. are in their original posted form (as received by our news server at
  31. cs.uoregon.edu).  Article threads are not added to the digest until the last
  32. article added to the thread is at least one month old (this is to ensure that
  33. the thread is dead before adding it to the digest).  Article threads that
  34. consist of only one message are generally not included in the digest.
  35.  
  36. The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
  37. [128.223.8.8] in the directory /pub/mac/csmp-digest.  Be sure to read the
  38. file /pub/mac/csmp-digest/README before downloading any files.  The most
  39. recent issues are available from sumex-aim.stanford.edu [36.44.0.6] in the
  40. directory /info-mac/digest/csmp.  If you don't have ftp capability, the sumex
  41. archive has a mail server; send a message with the text '$MACarch help' (no
  42. quotes) to LISTSERV@ricevm1.rice.edu for more information.
  43.  
  44. The digest is also available via email.  Just send a note saying that you
  45. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  46. automatically receive each new issue as it is created.  Sorry, back issues
  47. are not available through the mailing list.
  48.  
  49. Send administrative mail to mkelly@cs.uoregon.edu.
  50.  
  51.  
  52. -------------------------------------------------------
  53.  
  54. From: russotto@eng.umd.edu (Matthew T. Russotto)
  55. Subject: DPI on the fly
  56. Date: Sun, 15 Nov 92 19:25:16 GMT
  57. Organization: Project GLUE, University of Maryland, College Park
  58.  
  59. Just a little information I found messing around with _Control and
  60. _Status codes.  If you have a multisync monitor but no software to
  61. change the resolution, this might come in handy.
  62.  
  63. To make the Q700 built-in video come up with the monitor in the mode
  64. you desire, make a _Control call, cscode=9,  csParam = &shortvar, with
  65. shortvar = to something from this little table:
  66.  
  67. C325:  12" monitor (512*384)
  68. C925:  13" monitor (640*480)
  69. C725:  16" monitor
  70. CB25:  640*480 VGA
  71. EB25:  800*600 SVGA
  72.  
  73. There are other values for all the other supported resolutions.  The
  74. way the hardware seems to work is it checks the sense lines.  If the sense
  75. lines are the same as last time, it comes up in the mode it was set
  76. to.  If they have changed, it comes up in the default mode for the new
  77. sense lines.  This means that no matter what the sense lines say, you
  78. can set the video mode to something else.
  79. - -- 
  80. Matthew T. Russotto    russotto@eng.umd.edu    russotto@wam.umd.edu
  81. Some news readers expect "Disclaimer:" here.
  82. Just say NO to police searches and seizures.  Make them use force.
  83. (not responsible for bodily harm resulting from following above advice)
  84.  
  85. +++++++++++++++++++++++++++
  86.  
  87. From: f434@cs.utexas.edu (David)
  88. Date: 20 Nov 92 16:13:59 GMT
  89. Organization: Erotica Neurotica
  90.  
  91. DPI on the fly
  92.  
  93. What is the control code for the 1152 x 870 resolution?
  94. How can I go about finding it out?
  95.  
  96. Thanks,
  97. David
  98.  
  99. ---------------------------
  100.  
  101. From: ejfried@snll-arpagw.llnl.gov (friedman_hill ernest j)
  102. Subject: Floating Point to String Conversion
  103. Date: 19 Nov 92 23:46:13 GMT
  104. Organization: Sandia National Labs, Livermore, CA
  105.  
  106. Hello Netsurfers,
  107.  
  108. Question: It seems like it is now possible to do floating point number ->
  109. text string conversion using system software instead of sprintf.  By usg
  110. the international utilities (or is it part of SANE?) routine FormatX2Str,
  111. you can do this in a Script-sensitive way, too.  Problem is, I have IM I-VI,
  112. but not the Worldwide Developer's Guide, nor the SANE Numerics manual.  The
  113. routine I'm interested in is mentioned on page 14-49 of IM-VI.  Does anyone
  114. have a little source code bit which shows how to use this routine? Any
  115. language is acceptable, I am mulngcomputerlingual.  Thanks muchly.
  116.  
  117. - --Foss Friedman-Hill 
  118.  
  119. +++++++++++++++++++++++++++
  120.  
  121. From: bowman@reed.edu (BoBoRamDos)
  122. Date: 21 Nov 92 00:16:58 GMT
  123. Organization: Reed College, Portland, OR
  124.  
  125. In article <357@snll-arpagw.llnl.gov> ejfried@snll-arpagw.llnl.gov (friedman_hil
  126. l ernest j) writes:
  127. >Question: It seems like it is now possible to do floating point number ->
  128. >text string conversion using system software instead of sprintf.
  129.  
  130. Here's what I use:
  131.  
  132. void ExtendToText(Str255 *outch,extended realNumber)
  133. {
  134.         short index=0;
  135.         decform theForm;
  136.         decimal theDecimal;
  137.  
  138.         theForm.digits = fFieldLength;
  139.  
  140.         switch (fOutputType) {
  141.                 case fixed:
  142.                         theForm.style = FIXEDDECIMAL;
  143.                         break;
  144.                 case scientific:
  145.                         theForm.style = FLOATDECIMAL;
  146.                         theForm.digits++;
  147.                 // FLOATDECIMAL sucks 1 digit to the left of the dec point
  148.                         break;
  149.         }
  150.  
  151.  
  152.         num2dec(theForm,realNumber,theDecimal);
  153.         dec2str(theForm,theDecimal,(char *) outch);
  154.         c2pstr((char *) outch);
  155. }
  156.  
  157. cheers,
  158. bobo              In seeking the unattainable,
  159. bowman@reed.edu            simplicity only gets in the way.
  160. A geek, by any other name...
  161.  
  162. ---------------------------
  163.  
  164. From: Jim Cook <J.Cook@ENS.Prime.COM>
  165. Subject: Invalidating the Entire Screen?
  166. Organization: Prime Computer, Inc.
  167. Date: Thu, 19 Nov 1992 22:04:47 GMT
  168.  
  169. Seem like an easy enough, innocent question:
  170.  
  171. I have a RasterOps 24STV Frame Grabber which both acts as a frame grabber and
  172. a video board for my Apple 13" monitor.  When I grab a frame, it scribbles over
  173. the entire screen because it uses the refresh memory for the screen as the
  174. buffer to grab the picture into.  Fair enough - a quick, cheap solution.
  175.  
  176. Alright, how do I invalidate the entire screen so it all gets redrawn?
  177. Obviously, I can invalidate my own window, but what about the windows belonging
  178. to other active applications or the desktop background or the menu bar?
  179.  
  180. Is there an easy one call should do it all?  
  181.  
  182. Attempting to post an invalidate to my window large enough to cover the entire
  183. desktop/screen doesn't cut it - it only gets my window (the invalidate is
  184. obviously clipped to my window).
  185.  
  186. I could open a window as large as the screen and immediately close it, but 
  187. that's kind of a hack and I don't know that it will take care of the menu bar.
  188.  
  189. There is the possibility of walking the list of open windows (assuming I can
  190. get to it in a documented manner), but I don't know the structure and that
  191. doesn't seem to cover the desktop background.
  192.  
  193. I've tried posting an invalidate to the window manager port, but that just
  194. caused a crash.
  195.  
  196. What's a poor image processing student to do?
  197.  
  198.  
  199. +++++++++++++++++++++++++++
  200.  
  201. From: kanderso@mabillon.ICS.UCI.EDU (Kenneth Anderson)
  202. Date: 19 Nov 92 23:50:22 GMT
  203.  
  204. In comp.sys.mac.programmer you write:
  205.  
  206. >Is there an easy one call should do it all?
  207.  
  208. Here is code that I saved, because it is the only code to date that
  209. Ben Haller has posted to the net.  I believe it does what
  210. you need...
  211.  
  212. >void InvalScreen()
  213. >{
  214. >        DrawMenuBar();
  215. >        PaintOne(0L,GrayRgn);
  216. >        PaintBehind(WindowList,GrayRgn);
  217. >}
  218.  
  219. After posting this code, Ben stated:
  220.  
  221. >I believe this is the only code I have ever posted that is copied
  222. >directly from Solarian II, so all you people who have been slavering
  223. >over the (imagined) prospect of getting Sol source out of my tight
  224. >little fists, rejoice!
  225.  
  226. Hope this helps,
  227.  
  228. Ken Anderson
  229. - --
  230. - --------------------------------------------------------------------------------
  231. Ken Anderson                           |  "I'd much rather live in perfection,
  232. U.C. Irvine                            |   than deal with reality." -- Kenbod
  233. - --------------------------------------------------------------------------------
  234. Happy! Happy! Happy! Joy! Joy! Joy!    |  Practice random kindness and
  235.                          -- Stimpy     |  senseless acts of beauty.
  236.                                        |  -- Anne Herbert
  237. - --------------------------------------------------------------------------------
  238.  
  239. +++++++++++++++++++++++++++
  240.  
  241. From: Jim Cook <J.Cook@ENS.Prime.COM>
  242. Organization: Prime Computer, Inc.
  243. Date: Fri, 20 Nov 1992 21:44:47 GMT
  244.  
  245. In article <9211191547.aa28279@Paris.ics.uci.edu> kanderso@mabillon.ICS.UCI.EDU
  246. (Kenneth Anderson) writes:
  247. >In comp.sys.mac.programmer you write:
  248. >
  249. >>Is there an easy one call should do it all?
  250. >
  251. >Here is code that I saved, because it is the only code to date that
  252. >Ben Haller has posted to the net.  I believe it does what
  253. >you need...
  254. >
  255. >>void InvalScreen()
  256. >>{
  257. >>        DrawMenuBar();
  258. >>        PaintOne(0L,GrayRgn);
  259. >>        PaintBehind(WindowList,GrayRgn);
  260. >>}
  261. >
  262. >After posting this code, Ben stated:
  263. >
  264. >>I believe this is the only code I have ever posted that is copied
  265. >>directly from Solarian II, so all you people who have been slavering
  266. >>over the (imagined) prospect of getting Sol source out of my tight
  267. >>little fists, rejoice!
  268.  
  269. This worked, though it took me a couple hours to debug (call me slow).
  270. The problem is that most people will probably execute this code and leave,
  271. therefore avoiding any problems.  
  272.  
  273. The problems one should be aware of are:
  274.  
  275. 1. DrawMenuBar should not be called with anything in the menu bar hilited.
  276.    IM Vol 1 warns about this.
  277.  
  278. 2. Both PaintOne and PaintBehind muck with the current value of qd.thePort.
  279.    Therefore, do a GetGWorld at the beginning of this call and a SetGWorld
  280.    after each of the calls (well, you probably could just do one set at the
  281.    end, but I was frustrated and ultimately played it safe).
  282.  
  283. Thanks to all!
  284. The net comes thru again!
  285.  
  286. Jim
  287.  
  288.  
  289. ---------------------------
  290.  
  291. From: tsa@cellar.org (The Silent Assassin)
  292. Subject: 3D graphics...
  293. Date: 17 Nov 92 00:32:42 GMT
  294. Organization: The Cellar BBS and public access system
  295.  
  296. Anyone have any source for doing 3D graphics?  I want to be able to draw a
  297. line, defined by the endpoints (x1,y1,z1) and (x2,y2,z2) and draw them on
  298. the 2D coordinate plane of the screen.  I managed to whip something up using
  299. lots of sines and cosines and junk like that, but altho it looks decent, it
  300. definately isn't right.  (still looks cool tho)
  301.  
  302. Also how about source for phong or ray-tracing?  
  303.  
  304.  
  305. Disclaimer: none. /earth is 98% full, please delete anyone you can.
  306. tsa@cellar.org | weeks quote:"  Whenever 'A' attempts by law to impose his
  307. moral standards on 'B', 'A' is most likely a scoundrel"-H.L. Mencken
  308. "Mispelled?  Impossible!  I have an error-correcting modem."
  309.  
  310. +++++++++++++++++++++++++++
  311.  
  312. From: reid@sunpix.East.Sun.COM (Reid Judd - Sun NC Development Center)
  313. Date: 18 Nov 1992 18:17:59 GMT
  314. Organization: Sun Visualization Products
  315.  
  316. In article <81XcuB4w164w@cellar.org>, tsa@cellar.org 
  317.  (The Silent Assassin) writes:
  318. |> Anyone have any source for doing 3D graphics?  I want to be able to draw a
  319. |> line, defined by the endpoints (x1,y1,z1) and (x2,y2,z2) and draw them on
  320. |> the 2D coordinate plane of the screen.  I managed to whip something up using
  321. |> lots of sines and cosines and junk like that, but altho it looks decent, it
  322. |> definately isn't right.  (still looks cool tho)
  323. |> 
  324. |> Also how about source for phong or ray-tracing?  
  325. |> 
  326. |>  
  327. - -- 
  328.     I was just waiting for someone to ask. :-)
  329.  
  330. You might want to take a look at Mac-RTrace.  FULL SOURCE included
  331. for rendering (Phong and Strauss shading), texture mapping, animation, 
  332. a backgroundable Macintosh user interface and QuickTime output.
  333.  
  334. And the price is right (freeware!).
  335.  
  336. If you're in Europe, you may pick Mac-RTrace up at: 
  337. asterix.inescn.pt [192.35.246.17] in the directory /pub/RTrace/Macintosh 
  338. but please restrict access to the nighttime (in Portugal) hours 
  339. of 19:00 to 08:00 GMT (Greenwich Universal Time).
  340.  
  341. I'm told it will be in AppleLink in a few days in the "Software Sampler"
  342. SW Collection area near the top level of AppleLink.
  343.  
  344. In North America:
  345.  
  346.   The Info-Mac archives are available (by using FTP, account anonymous,
  347.   any password) in the info-mac directory on sumex-aim.stanford.edu
  348.   [36.44.0.6].
  349.  
  350. - ---------------
  351.  
  352. [Archived as /info-mac/app/mac-rtrace-10.hqx; 535K]:
  353.  
  354.   This file contains the Mac-RTrace-1.0 application and complete manuals
  355.   in Microsoft Word and TeachText format.  This version of RTrace
  356.   requires at least a Mac with a 68020/68881 FPU but it is possible
  357.   to build a version from the source that does not have this
  358.   restriction.
  359.  
  360.   Two small scene files (demo.sff and sphere.sff) are included.
  361.  
  362. - ---------------
  363.  
  364.  
  365. [Archived as /info-mac/source/c/mac-rtrace-10.hqx; 643K]
  366.  
  367.   This is the source distribution for Mac-RTrace-1.0.  It requires
  368.   Think-C-5.0 to compile it and you can (optional) use the "Balloon Writer"
  369.   from APDA in order to add the Balloon help to it once you've built it.
  370.  
  371. - ---------------
  372.  
  373. [Archived as /info-mac/art/qt/rtrace-fly-thru.hqx; 1122K]:
  374.  
  375.  
  376.   NOTE:  QuickTime-1.5 is required to play back this movie.
  377.   It was created with the new "Compact Video" compressor using
  378.   the "high quality" setting.
  379.  
  380. - --------------- 
  381.  
  382. [Archived as /info-mac/app/mac-rtrace-scenes.hqx; 407K]
  383.  
  384.   This file contains about 50 scenes for use with Mac-RTrace.
  385.   Included in this package are: many molecular models such as DNA, Jet
  386.   aircraft, a triceritops dinosaur, and numerous examples of textures.
  387.   More scenes may be obtained via FTP at asterix.inescn.pt [192.35.246.17].
  388.  
  389.   You will need RTrace in order to create and animate these scenes.
  390.  
  391.   RTrace was written by Antonio Costa at INESC-Norte in Portugal.  The
  392.   MacIntosh version was written by Greg Ferrar at Ohio State and myself
  393.   (Reid Judd at Illuminati).
  394.  
  395.   RTrace supports these capabilities:
  396.     point lights, directional lights, spot lights with fall-off, extended
  397.     lights, 2 ways of defining surfaces, spheres, axis-aligned
  398.     parallelipipeds, cylinders, cones, bicubic patches, polygons,
  399.     polygonal patches, high quality 3D text, CSG operations,
  400.     4x4 matrix transformations, textures, depth of field, diffuse
  401.     distribution, stereoscopic pair creation, ...
  402.  
  403.     Procedural textures (with 4x4 matrix transformations) are also
  404.     supported: checkerboard, color blotches, marble, bump map,
  405.     fractal-brownian-motion, wood, glossy, image mapping, waves,
  406.     and many others.
  407.  
  408.   Mac-RTrace uses parametric equations (using an algebraic equation
  409.   parser) to define animations and it outputs PICT images, PPM images,
  410.   and (of course) QuickTime movies.
  411.  
  412.   Enjoy,
  413.             -- Reid Judd
  414.  
  415.      ILLUMINATI@AppleLink.Apple.Com
  416.      2617 Sweetbriar Rd.
  417.      Durham, NC 27704
  418.  
  419.  
  420.  
  421.  
  422.                                                     
  423.                                                                  
  424.  
  425.  
  426. +++++++++++++++++++++++++++
  427.  
  428. From: fixer@faxcsl.dcrt.nih.gov (Chris Spiral Catfish Tate)
  429. Organization: Computer Systems Laboratory, DCRT, NIH
  430. Date: Wed, 18 Nov 1992 19:23:01 GMT
  431.  
  432. Another excellent ray-tracing program for the Mac (and several other platforms)
  433. is the Persistence of Vision Raytracer (POV-Ray).  It is a joint collaboration
  434. between a number of programmers, very much in the tradition of the MS-DOS
  435. program FRACTINT.
  436.  
  437. The home FTP site for POV-Ray is alfred.ccs.carleton.ca, in the /pub/povray
  438. directory tree.
  439.  
  440. A catalog of its features is pretty impressive: CSG, a slew of procedural
  441. textures (which may be layered), image-mapping, height-mapping, image-based
  442. texture mapping, bicubic patches, arbitrary quadric and quartic surfaces,
  443. etc.  See the documentation for a full explanation.
  444.  
  445. - ------------------------------------------------------------------------------
  446. Christopher Tate             | The Leadfoot Collection, Continued:
  447. Management System Designers  |     * Heavy Fuel (Dire Straits)
  448.                              |     * Last Scene in September (Preston Reed)
  449. fixer@faxcsl.dcrt.nih.gov    | Because driving fast is a cathartic experience.
  450.  
  451. ---------------------------
  452.  
  453. From: petrus@stacken.kth.se (Lars Petrus)
  454. Subject: How do you make a master disk?
  455. Date: 11 Nov 92 16:10:05 GMT
  456. Organization: Stacken Computer Club, Stockholm, Sweden
  457.  
  458.  
  459.    Some software products are sold on disks that can not be copied - or so
  460. I'm told. This means that you can have an installer program on that disk,
  461. and only allow a limited number of installations from that disk.
  462.  
  463.    But I can not see any way that this can be accomplished. If you copy a disk
  464. you copy every byte of is, and thats that.
  465.  
  466.    Any ideas?
  467.  
  468.  
  469.   -  -  -  -
  470. "Sometimes it is said that man cannot be trusted with the government of
  471.  himself.  Can he, then, be trusted with the government of others?"
  472.                                 --- Thomas Jefferson
  473.  
  474. Lars Petrus, Solna, Sweden  -  petrus@stacken.kth.se
  475.  
  476. +++++++++++++++++++++++++++
  477.  
  478. From: time@ice.com (Tim Endres)
  479. Date: Wed, 11 Nov 92 21:27:36 EST
  480. Organization: ICE Engineering, Inc.
  481.  
  482.  
  483. In article <1992Nov11.161005.23758@kth.se> (comp.sys.mac.programmer), petrus@stacken.kth.se (Lars Petrus) writes:
  484. >    Some software products are sold on disks that can not be copied - or so
  485. > I'm told. This means that you can have an installer program on that disk,
  486. > and only allow a limited number of installations from that disk.
  487. >    But I can not see any way that this can be accomplished. If you copy a disk
  488. > you copy every byte of is, and thats that.
  489. >    Any ideas?
  490.  
  491. One way this is done is to use a special disk drive to write the disk
  492. and write data at a higher rate than the typical Macintosh can write
  493. it. However, the typical Mac drive is capable of reading this faster
  494. written data. Thus, you can read it all day long, but you need the
  495. special drive to write it.
  496.  
  497. I do not know if this is still done or not.
  498.  
  499.  
  500. tim endres - time@ice.com
  501.  
  502. Register your company in the Internet Business Pages!
  503.  ...send email to "ibp-info@msen.com" for details...
  504.  
  505. USENET - a slow moving self parody... ph
  506.  
  507. +++++++++++++++++++++++++++
  508.  
  509. From: s_titz@ira.uka.de (Olaf Titz)
  510. Date: 12 Nov 1992 09:36:34 GMT
  511. Organization: Fachschaft math/inf, Uni Karlsruhe, FRG
  512.  
  513. In article <1992Nov11.161005.23758@kth.se> petrus@stacken.kth.se (Lars Petrus) writes:
  514. >   Some software products are sold on disks that can not be copied - or so
  515. >I'm told. This means that you can have an installer program on that disk,
  516. >and only allow a limited number of installations from that disk.
  517. >
  518. >   But I can not see any way that this can be accomplished. If you copy a disk
  519. >you copy every byte of is, and thats that.
  520.  
  521. This is only one of the reasons why Apple explicitly discourages the
  522. use of copy protection schemes - all of them can be defeated.
  523.  
  524. I may disagree with Apple in many points, but I feel to that copy
  525. protection is a Bad Thing.
  526.  
  527. olaf
  528. - -- 
  529. | Olaf Titz - comp.sc.student  |   o     | uknf@dkauni2.bitnet | old address |
  530. | univ. of karlsruhe - germany |  _>\ _  | s_titz@ira.uka.de   | is still    |
  531. | +49-721-60439                | (_)<(_) | praetorius@irc      | valid       |
  532.    "Stop talkin' and start chalkin'!" - Eight Ball Deluxe
  533.  
  534. +++++++++++++++++++++++++++
  535.  
  536. From: James_Zuchelli@qm.claris.com (James Zuchelli)
  537. Date: 13 Nov 92 02:07:31 GMT
  538. Organization: Claris Corp
  539.  
  540. In article <1992Nov11.161005.23758@kth.se>, petrus@stacken.kth.se (Lars Petrus) writes:
  541. >    Some software products are sold on disks that can not be copied - or so
  542. > I'm told. This means that you can have an installer program on that disk,
  543. > and only allow a limited number of installations from that disk.
  544. >    But I can not see any way that this can be accomplished. If you copy a disk
  545. > you copy every byte of is, and thats that.
  546. >    Any ideas?
  547. >   -  -  -  -
  548. > "Sometimes it is said that man cannot be trusted with the government of
  549. >  himself.  Can he, then, be trusted with the government of others?"
  550. >                                 --- Thomas Jefferson
  551. > Lars Petrus, Solna, Sweden  -  petrus@stacken.kth.se
  552. I have heard that one way to do it is to write part of your code to a portion
  553. of the master disk that is not normally used by the operating system you are
  554. running on.
  555.  
  556. Some disks for the Apple II series used a system that wrote the tracks in
  557. a spiral pattern, completely different form the standard Apple II DOS.
  558.  
  559. However, be sure you want to do this, when I owned an Apple II I wouldn't buy
  560. anysoftware that I couldn't make backup copies of.  If The master disk
  561. gets trashed and I need to get to a file, what am I supposed to do?  
  562.  
  563. James Zuchelli
  564. - ---------------
  565. This is my opinion and not that of Claris Corp. or my Employer.
  566.  
  567. +++++++++++++++++++++++++++
  568.  
  569. From: potts@oit.itd.umich.edu (Paul Potts)
  570. Date: 13 Nov 92 17:19:53 GMT
  571. Organization: Instructional Technology Laboratory, University of Michigan
  572.  
  573. In article <15352@claris.com> James_Zuchelli@qm.claris.com (James Zuchelli) writes:
  574. >In article <1992Nov11.161005.23758@kth.se>, petrus@stacken.kth.se (Lars Petrus) writes:
  575. >> 
  576. >> 
  577. >>    Some software products are sold on disks that can not be copied - or so
  578. >> I'm told. This means that you can have an installer program on that disk,
  579. >> and only allow a limited number of installations from that disk.
  580. >> 
  581. >>    But I can not see any way that this can be accomplished. If you copy a disk
  582. >> you copy every byte of is, and thats that.
  583. >> 
  584. >>    Any ideas?
  585. >> 
  586.  
  587. In the bad old days of the Commodore-64, which had a programmable floppy
  588. drive, companies would ship disks with specially written tracks that gave
  589. different types of sector and track errors when read. Then hackers came up
  590. with their own schemes to duplicate these bad sectors by programming the
  591. drive to write bad sectors... and companies came out with disk cracking
  592. programs that would sense the bad sectors and tracks and re-create them,
  593. software developers came up with even more nefarious schemes... etc.
  594.  
  595. I'm glad those days seem to be gone... I once had to install some software
  596. on a Mac from a disk that allowed a limited number of installs (some kind
  597. of DNA sequencing program). Of course, the installer was buggy, though, and
  598. so would crash halfway through an installation, but still tell you that
  599. you had "used up" one of your installations. This was a big pain. We didn't
  600. wind up doing any more business with that vendor.
  601.  
  602. - -- 
  603. Politics is crime pursued by other means.              
  604. potts@oit.itd.umich.edu      CI$ 71561,3362 (rarely)
  605.  
  606. +++++++++++++++++++++++++++
  607.  
  608. From: stanger@otago.ac.nz (Nigel Stanger)
  609. Date: 17 Nov 92 06:09:45 GMT
  610. Organization: University of Otago, Dunedin, New Zealand
  611.  
  612. petrus@stacken.kth.se (Lars Petrus) writes:
  613. >   Some software products are sold on disks that can not be copied - or so
  614. >I'm told. This means that you can have an installer program on that disk,
  615. >and only allow a limited number of installations from that disk.
  616. >
  617. >   But I can not see any way that this can be accomplished. If you copy a disk
  618. >you copy every byte of is, and thats that.
  619.  
  620. One thing I've heard of is that you copy your software onto a
  621. floppy, then physically wipe out one of the sectors on the disk
  622. (maybe zap the surface coating with a laser or something -- I
  623. don't really know how it's done). The software looks at this
  624. sector when it runs, and the cunning thing is that it _expects_
  625. to get a read error at this point. No matter how you copy the
  626. disk, the copy program or whatever won't be able to recreate that
  627. bad sector, so when the software tries to read it that sector and
  628. _succeeds_ it screams "PIRATE! PIRATE!" and explodes :)
  629.  
  630. The only way to get around this is to figure out where the
  631. program reads the dead sector and patch it out.
  632.  
  633. - ----------------------------------------------------------------------
  634. Nigel Stanger,                  Internet: stanger@otago.ac.nz
  635. University of Otago,            Phone: +64 3 479-8179
  636. Dunedin, NEW ZEALAND.           Fax:   +64 3 479-8311
  637. Peggy Babcock. Peggy Babcock. Peggy Babcock.
  638.  
  639. +++++++++++++++++++++++++++
  640.  
  641. From: liran@bimacs.BITNET (Eshel Liran)
  642. Date: 17 Nov 92 17:11:55 GMT
  643. Organization: Math department, Bar-Ilan University, Ramat-Gan, ISRAEL
  644.  
  645. I know a few companies which protected their master disk by making a
  646. hole in it, using a laser beam. I think it costs the developer about
  647. 1$ per disk, and I don't think it can be copied.
  648.  
  649. Liran Eshel
  650. Bar-Ilan Univeristy, ISRAEL
  651. liran@bimacs.cs.biu.ac.il
  652.  
  653.  
  654.  
  655.  
  656. +++++++++++++++++++++++++++
  657.  
  658. From: reed@snake.tc.cornell.edu (Michael G. Reed)
  659. Date: 19 Nov 92 12:28:43 GMT
  660. Organization: Cornell National Supercomputing Facility
  661.  
  662. In article <4476@bimacs.BITNET>, liran@bimacs.BITNET (Eshel Liran) writes:
  663. |> I know a few companies which protected their master disk by making a
  664. |> hole in it, using a laser beam. I think it costs the developer about
  665. |> 1$ per disk, and I don't think it can be copied.
  666. |> 
  667. |> Liran Eshel
  668. |> Bar-Ilan Univeristy, ISRAEL
  669. |> liran@bimacs.cs.biu.ac.il
  670.  
  671. That method was popular on the old Apple ][ for a while until developers
  672. were sued for damages...Appears that they would burn the hole out around the
  673. outter edge of the disk, and then make sure the drive would never go there
  674. in normal operation.  The idea was that when the user tried to copy it, and
  675. the head passed over the damaged area, it would destroy the read/write head.
  676. Great, 'huh?  Anyway, that's a thing of the past.
  677.  
  678. - -Michael
  679. - -----------------------------------------------------------------------------
  680. Michael G. Reed                                         (reed@TC.Cornell.EDU)
  681. Cornell National Supercomputing Facility                       (607)/254-8806
  682. - -----------------------------------------------------------------------------
  683.         Why be normal, it's boring; and boring people should be shot.
  684.  
  685. Note:  These are not the views of my employer (and probably not mine either).
  686.  
  687. ---------------------------
  688.  
  689. From: jones@pogo.den.mmc.com (Jonathan Jones)
  690. Subject: Possible Bug  With MPW
  691. Organization: Martin Marietta WIS
  692. Date: Tue, 17 Nov 1992 22:40:45 GMT
  693.  
  694.  
  695.  *********************  Operating Enviroment **********************
  696.  
  697.    Running on a Macintosh IIfx
  698.                 System 7
  699.                 8 meg. of memory
  700.  
  701.                 MPW 3.2  -- E.T.O # 8 
  702.  
  703.    
  704.    We sent this problem to Apple by mail about 3 weeks ago, and to their Cplus.Bugs@AppleLink.Apple.Com a week ago.
  705.    We have heard no response.  Is this the Norm for Apple ?  
  706.    
  707.    We would like to know if other people can reproduce the following problem ? 
  708.    Does anyone have ANY solution to it ?
  709.      
  710.  
  711. ****************************  Problem   **************************************************
  712.  
  713.   Put in either "virtual" or both "virtual"s on the destructors and the compiler will fail!!
  714.  
  715.   It will only compile, if "virtual" is removed from BOTH destructors.
  716.  
  717.  
  718.    
  719.  
  720. *************   Stripped Down Source Code  *** Note: No Include File for this small Example  ***
  721.  
  722. class Object
  723. {
  724. public:
  725.     virtual  ~Object( void ) {}    
  726. };
  727.  
  728.  
  729. class Bool : public Object
  730. {
  731. public:
  732.     virtual ~Bool( void ) {}
  733. };
  734.  
  735.  
  736. void f3() 
  737. {
  738.     Bool *p  = new Bool[10];
  739.     
  740.     delete [] p;      // no size necessary
  741. }
  742.  
  743.  
  744. *********************  Compile line   ****************************
  745.  
  746.       CPlus   fileName.cpp   
  747.  
  748.  
  749.  
  750.  
  751. *********************  Output from C compiler, gets past Cfront ****************************
  752. #
  753. #
  754. #?
  755. ### Error 211 Pointer type required
  756. #?
  757. ### Error 24 ')' expected
  758. #?
  759. ### Error 229 mismatch between formal and actual parameter types
  760. #?
  761. ### Error 258 There are not enough arguments
  762. #?
  763. ### Error 30 ';' expected
  764. #?
  765. ### Error 22 error in factor
  766. #?
  767. ### Error 212 Struct or Union type required
  768. #?
  769. ### Error 23 identifier not declared
  770. #--------------------------------------------------------------------------------------------------------------------------------
  771. !1; Open "{Target}"
  772. #--------------------------------------------------------------------------------------------------------------------------------
  773.  
  774.  
  775.  
  776.  
  777.  
  778. ********************************************************************************* 
  779. *
  780. *   From :     Steve McCabe & Jonathan Jones
  781. *              (303) 971-5124  (303) 971-5101
  782. *
  783. *   Reply to : /s=McCabe/g=Steve/ou=msmail/o=den.mmag/prmd=mmc/admd=telemail/c=us/@x400
  784. *
  785. *********************************************************************************
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793. +++++++++++++++++++++++++++
  794.  
  795. From: bowman@reed.edu (BoBoRamDos)
  796. Date: 18 Nov 92 01:19:31 GMT
  797. Organization: Reed College, Portland, OR
  798.  
  799. In article <1992Nov17.224045.8582@den.mmc.com> jones@pogo.den.mmc.com (Jonathan Jones) writes:
  800. > [Error in CFront:  cannot delete arrays of objects if their destructor
  801. > is virtual]
  802.  
  803. Yes, I reported this bug to Apple many months ago.  They did respond, but as
  804. of CFront 3.3a8, they still haven't fixed it.  Nor did they tell me that
  805. removing the virtual would fix the problem.  Grrr.  Anyhow, I went through
  806. many firey hoops until I tried removing the virtual, and that worked.
  807.  
  808. If you absotively, posolutely *must* keep your destructor virtual, I suspect
  809. you could hack the C code CFront spits out...just remember to run it through
  810. CDent first!
  811.  
  812. good luck,
  813. bobo
  814. bowman@reed.edu
  815. A geek by any other name.
  816.  
  817. ---------------------------
  818.  
  819. From: crevier@husc8.harvard.edu (Daniel Crevier)
  820. Subject: Reading in jpeg compressed PICT files
  821. Date: 13 Nov 92 00:24:50 GMT
  822. Organization: Harvard University Science Center
  823.  
  824.  
  825.     I am trying to convert some PICT files that were captured with the
  826. video spigot into a format called FITS so that I can use them with a program
  827. called macvista.  My problem is in loading the pict files.  My plan was to
  828. create a gworld, and then open the PICT files using the source from tech note
  829. 152, and then draw it in the gworld, and then go through it with GetCPixel, and
  830. convert it.  I can't get it working...  I tried just loading a picture into 
  831. a CWindow using the source from tech note 152, and it crashes when doing the
  832. DrawPicture call.  Will this not work with JPEG pictures for some reason?  I 
  833. can send source if needed.  Any help, or pointers to source to load pictures
  834. would be appreciated.
  835.  
  836. Dan
  837.  
  838. crevier@husc8.harvard.edu
  839.  
  840. +++++++++++++++++++++++++++
  841.  
  842. From: krk@oit.itd.umich.edu (Kenneth Knight)
  843. Date: 13 Nov 92 18:48:06 GMT
  844. Organization: Instructional Technology Laboratory, University of Michigan
  845.  
  846. In article <1992Nov12.192450.17388@husc3.harvard.edu> crevier@husc8.harvard.edu (Daniel Crevier) writes:
  847. >
  848. >    I am trying to convert some PICT files that were captured with the
  849. >video spigot into a format called FITS so that I can use them with a program
  850. >called macvista.  My problem is in loading the pict files.  My plan was to
  851. >create a gworld, and then open the PICT files using the source from tech note
  852. >152, and then draw it in the gworld, and then go through it with GetCPixel, and
  853. >convert it.  I can't get it working...  I tried just loading a picture into 
  854. >a CWindow using the source from tech note 152, and it crashes when doing the
  855. >DrawPicture call.  Will this not work with JPEG pictures for some reason?  I 
  856. >can send source if needed.  Any help, or pointers to source to load pictures
  857. >would be appreciated.
  858.  
  859. I'm not sure this will answer your question,but here goes. You will have to
  860. work with QuickTime. Full documentation on QuickTime is at ftp.apple.com and
  861. you will want to focus on the Image Compression chapter. In brief, you will
  862. need to do the following things:
  863.  
  864. 1. Load your picture dat into a pointer of the proper size.
  865. 2. You need to create an ImageDescriptionRecord (actually a handle
  866.    of type ImageDescriptionHandle) and fill it appropriately. Probably the
  867.    easiest way to figure out just what to fill it with would be to run
  868.    one of the sample compression program (again all this is at ftp.apple.com)
  869.    and see what such a record look like when decompressing a JPEG file. You'll
  870.    want to skim the docs here to decide which codec is best for you (i.e., 
  871.     best performance over bestspeed or best-for-the-machine).
  872. 3. Once all this is done create a GWorld of the proper size and depth.
  873. 4. Use the DecompressImage function:
  874. FUNCTION DecompressImage (data: Ptr; desc: ImageDescriptionHandle; dst: PixMapHandle; srcRect: Rect; dstRect: Rect; mode: Integer; mask: RgnHandle): OSErr;
  875.  
  876. You'll need to imclude various .h files including codec.h compression.h,
  877. imagedescription.h (I think those names are right).
  878.  
  879. Good luck.
  880.  
  881.   ** Ken **
  882.  
  883. +++++++++++++++++++++++++++
  884.  
  885. From: lari@chopin.cs.unc.edu (Humayun Lari)
  886. Date: 19 Nov 92 01:58:15 GMT
  887. Organization: The University of North Carolina at Chapel Hill
  888.  
  889. In article <1e0t96INN7ac@terminator.rs.itd.umich.edu> krk@oit.itd.umich.edu (Kenneth Knight) writes:
  890. >In article <1992Nov12.192450.17388@husc3.harvard.edu> crevier@husc8.harvard.edu (Daniel Crevier) writes:
  891. >>I tried just loading a picture into 
  892. >>a CWindow using the source from tech note 152, and it crashes when doing the
  893. >>DrawPicture call.  Will this not work with JPEG pictures for some reason?
  894. >>[rest deleted]
  895. >
  896. >I'm not sure this will answer your question,but here goes. You will have to
  897. >work with QuickTime.
  898. >[QuickTime info deleted]
  899.  
  900. You should not have to use QuickTime routines to simply draw a PICT file of
  901. any kind, even if QuickTime routines have been used to compress the file.
  902. DrawPicture should work fine as long as QuickTime is installed.
  903.  
  904. It would help if you provided some information about the kind of crash. I
  905. assume you're using the TCL; try calling SetAllocation(kAllocCanFail) before
  906. the DrawPicture call and see if that helps -- CopyBits might be requesting
  907. lots of memory, and that makes the TCL *very* unhappy. You need to restore the
  908. previous allocation setting afterwards, of course.
  909.  
  910. Humayun Lari
  911. (lari@cs.unc.edu)
  912.  
  913. ---------------------------
  914.  
  915. End of C.S.M.P. Digest
  916. **********************
  917.